<template>
	<view class="start  bg-white  clearfix">
		<view class="ovh " v-if="!token"><swipers @change="lunbos" :slides="swiperList" srcName="img" class="radius-10" :indicatorDots='false' :height="1334"></swipers></view>
		<image class="start-img block wp100 hp100" v-else src="/static/starts.png" mode="aspectFill"></image>
	</view>
</template>

<script>
import { mapState, mapActions } from 'vuex';
export default {
	data() {
		return { navbarColor: true, indicatorDots: false,
            autoplay: false,
            interval: 2000,
            duration: 500, swiperList: ['/static/start1.png', '/static/start2.png', '/static/start3.png'] };
	},
	computed: {},
	onLoad() {
		if(this.token){
			setTimeout(()=>{
				this.$Router.pushTab({ path: '/pages/home/index' })
			},1000)
		}
	},
	methods: {
		lunbos(item) {
			if(item.detail.current==0){
				this.$Router.pushTab({ path: '/pages/home/index' });
			}
		},
		pushHome() {
			if (this.token) {
				this.$Router.pushTab({ path: '/pages/home/index' });
			} else {
				uni.redirectTo({ url: '/pages/login/login' });
			}
		}
	}
};
</script>
<style lang="less">
page {
	background-color: #ffffff;
}
.start {
	&-img {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
	}
}
</style>
